package com.tspp.dao;

import com.tspp.dao.dto.Entrant;
import java.util.List;

/**
 * Interface for entrant dao. Contains crud operation.
 * @author Maks
 */
public interface EntrantDao {

    /**
     * Inserts a new row in the ENTRANT table.
     */
    public void insert(Entrant dto) throws DaoException;

    /**
     * Updates a single row in the ENTRANT table.
     */
    public void update(int entrant, Entrant dto) throws DaoException;

    /**
     * Deletes a single row in the ENTRANT table.
     */
    public void delete(int entrant) throws DaoException;

    /**
     * Returns all rows from the ENTRANT table that match the criteria 'ID_ENTRANT = :idEntrant'.
     */
    public Entrant findByPrimaryKey(int idEntrant) throws DaoException;

    /**
     * Returns all rows from the ENTRANT table that match the criteria ''.
     */
    public List<Entrant> findAll() throws DaoException;

    /**
     * Returns all rows from the ENTRANT table that match the criteria 'ID_GROUP = :idGroup'.
     */
    public List<Entrant> findByGroupa(int idGroup) throws DaoException;

    /**
     * Returns all rows from the ENTRANT table that match the criteria 'ID_GROUP = :idGroup'.
     */
    public List<Entrant> findWhereIdGroupEquals(int idGroup) throws DaoException;

    /**
     * Returns all rows from the ENTRANT table that match the criteria 'NAME = :name'.
     */
    public List<Entrant> findWhereNameEquals(String name) throws DaoException;

    /**
     * Returns all rows from the ENTRANT table that match the criteria 'SURNAME = :surname'.
     */
    public List<Entrant> findWhereSurnameEquals(String surname) throws DaoException;

    /**
     * Returns all rows from the ENTRANT table that match the criteria 'ADDRESS = :address'.
     */
    public List<Entrant> findWhereAddressEquals(String address) throws DaoException;

}
